import Layout from '@/layout'

export default [
  // 管理员首页
  {
    path: '/admin-home',
    component: Layout,
    redirect: '/admin-home/index',
    name: 'admin-home',
    meta: {
      title: '首页',
      icon: 'sidebar-component',
      auth: ['admin']
    },
    children: [
      {
        path: 'index',
        component: () => import('@/views/index_admin'),
        meta: {
          title: '首页',
          sidebar: false
        }
      }
    ]
  },
  // 用户首页
  {
    path: '/user-home',
    component: Layout,
    redirect: '/user-home/index',
    name: 'user-home',
    meta: {
      title: '首页',
      icon: 'sidebar-component',
      auth: ['user']
    },
    children: [
      {
        path: 'index',
        component: () => import('@/views/index_user'),
        meta: {
          title: '首页',
          sidebar: false
        }
      }
    ]
  },
  // 体育用品管理
  {
    path: '/equip',
    component: Layout,
    meta: {
      title: '体育用品管理',
      icon: 'sport',
      auth: ['admin']
    },
    children: [
      {
        path: '/',
        component: () => import('@/views/equip/list'),
        name: 'equip',
        meta: {
          sidebar: false
        }
      }
    ]
  },
  // 用户管理
  {
    path: '/userManagement',
    component: Layout,
    meta: {
      title: '用户管理',
      icon: 'users',
      auth: ['admin']
    },
    children: [
      {
        path: '/',
        component: () => import('@/views/userManagement/index'),
        name: 'userManagement',
        meta: {
          sidebar: false
        }
      }
    ]
  },
  // 我要借用
  {
    path: '/borrow',
    component: Layout,
    meta: {
      title: '我要借用',
      icon: 'borrow'
    },
    children: [
      {
        path: '/',
        component: () => import('@/views/borrow/borrow'),
        name: 'borrow',
        meta: {
          sidebar: false
        }
      }
    ]
  },
  // 我要归还
  {
    path: '/return',
    component: Layout,
    meta: {
      title: '我要归还',
      icon: 'return'
    },
    children: [
      {
        path: '/',
        component: () => import('@/views/return/list'),
        name: 'return',
        meta: {
          sidebar: false
        }
      }
    ]
  },
  // 我的借单
  {
    path: '/borrow-list',
    component: Layout,
    meta: {
      title: '我的借单',
      icon: 'borrow-list'
    },
    children: [
      {
        path: '/',
        component: () => import('@/views/borrow/list'),
        name: 'borrow-list',
        meta: {
          sidebar: false
        }
      }
    ]
  }
]
